$(function(){
    var token =sessionStorage.getItem("token");
    $.ajax({
        type:"post",
        url:"http://www.rice.com/app/api/h5_access",
        data:{token:token,method:"Plan|get_plan_type"},
        dataType:"json",
        success:function(result){
            if(result.status=="1"){
                var  data=result.data
                var sttr="";
                for(var i in data){
                     sttr+='<option value="'+data[i].type+'" class="chan">'+data[i].name+'</option>';
                }
               $(".cha").append(sttr);
                
            }else if(result.status=="2"){
                alert(result.message);
                location.href="login.html";
            }else{
                alert(result.message);
            }
        }
    })
})